<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>百顺通云-后台订单详情页面</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- 公用js文件引入 -->
        <jsp:include page="../admin/commonCSS.jsp"></jsp:include>
        
    </head>
    <body class="skin-blue">
    
        <!-- 公用头部 -->
        <jsp:include page="../admin/commonHeader.jsp"></jsp:include>
       
        <div class="wrapper row-offcanvas row-offcanvas-left">
            
            <!-- 公用导航 -->
            <jsp:include page="../admin/commonMenu.jsp"></jsp:include>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                       	 订单列表管理
                        <small>订单详情</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
                        <li class="active">订单管理</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    <!-- Small boxes (Stat box) -->
                    <div class="row fixrowscroll">
                        
                        <!-- table数据 -->
                        <div class="box-body table-responsive">
                            <div class="dataTables_wrapper form-inline fixwrapperscroll" role="grid">
                                <div class="row">
                                    <div class="col-xs-6"></div>
                                    <div class="col-xs-6"></div>
                                </div>
			                	<table class="table table-bordered table-hover dataTable">
									<tbody>
										<tr>
											<td width="20%" class="taright">订单编号：</td>
											<td width="30%"><span id="DorderNum">${orderInfo.orderNum}</span></td>
											<td width="20%" class="taright">套餐名称：</td>
											<td><span id="DmealName">${orderInfo.mealName}</span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">用户名：</td>
											<td width="30%">
											<span id="DuserName">
											<c:if test="${orderInfo.userEmail != null&&orderInfo.userEmail != ''}">${orderInfo.userEmail}</c:if>
										    <c:if test="${orderInfo.userEmail == null||orderInfo.userEmail == ''}">${orderInfo.userTell}</c:if>
										    </span></td>
											<td width="20%" class="taright">购买者：</td><td>
											<span id="DparentId">
											<c:if test="${orderInfo.parentEmail != null&&orderInfo.parentEmail != ''}">${orderInfo.parentEmail}</c:if>
										   	<c:if test="${orderInfo.parentEmail == null||orderInfo.parentEmail == ''}">${orderInfo.parentTell}</c:if>
										   	</span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">公司全称：</td>
											<td width="30%"><span id="DbelongCompanyName">${orderInfo.belongCompanyName}</span></td>
											<td width="20%" class="taright">公司域名：</td>
											<td><span id="DcompanyDomainName">${orderInfo.companyDomainName}</span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">原有产品：</td>
											<td colspan="3"><span id="DproductName">
											<c:forEach items="${pList}" var="pl" varStatus="status">${pl.productName}, </c:forEach></span></td>
										</tr>
										<tr>	
											<td width="20%" class="taright">新增产品：</td>
											<td colspan="3"><span id="DproductName">${orderInfo.productName}</span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">新增产品详细信息：</td>
											<td colspan="3"><span id="DdataExtend">
											<c:if test="${orderInfo.dataExtend != null&&orderInfo.dataExtend != ''}">使用年限为：</c:if><c:forTokens items="${orderInfo.dataExtend}" delims="&" var="productLife" begin="0" end="0">${productLife}</c:forTokens>
											<c:if test="${orderInfo.dataExtend != null&&orderInfo.dataExtend != ''}">，使用人数为：</c:if><c:forTokens items="${orderInfo.dataExtend}" delims="&" var="productLife" begin="1" end="1">${productLife}</c:forTokens>
											<c:if test="${orderInfo.dataExtend != null&&orderInfo.dataExtend != ''}">，到期时间为：<fmt:formatDate value="${orderInfo.proOverTime}" pattern="yyyy-MM-dd HH:mm:ss"/></c:if>
											<c:if test="${orderInfo.dataExtend == null||orderInfo.dataExtend == ''}">${orderInfo.dataExtend}</c:if>
											</span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">套餐使用年限：</td>
											<td width="30%">
											<span id="DuseLife">
											<c:if test="${orderInfo.useLife == -1}">永久</c:if>
										    <c:if test="${orderInfo.useLife == 0}">20天试用</c:if>
										    <c:if test="${orderInfo.useLife != 0 && orderInfo.useLife != -1}">${orderInfo.useLife}年</c:if></span></td>
											<td width="20%" class="taright">套餐使用人数：</td>
											<td><span id="DuserNum">${orderInfo.userNum}</span></td>
										</tr>	
										<tr>
											<td width="20%" class="taright">新增产品使用年限：</td>
											<td width="30%"><span id="DuseLife">
											<c:forTokens items="${orderInfo.dataExtend}" delims="&" var="productLife" begin="0" end="0">${productLife}</c:forTokens></span></td>
											<td width="20%" class="taright">新增产品使用人数：</td>
											<td width="30%"><span id="DuserNum">
											<c:forTokens items="${orderInfo.dataExtend}" delims="&" var="productLife" begin="1" end="1">${productLife}</c:forTokens></span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">实付金额：</td>
											<td><span id="DpayMoney">${orderInfo.payMoney}</span></td>
											<td width="20%" class="taright">应付金额：</td>
											<td width="30%"><span id="DorderMoney">${orderInfo.orderMoney}</span></td>
										</tr>
										<tr>	
											<td width="20%" class="taright">账户余额支付金额：</td>
											<td width="30%"><span id="DpayByAccount">${orderInfo.payByAccount}</span></td>
											<td width="20%" class="taright">第三方支付金额：</td>
											<td><span id="DpayByOther">${orderInfo.payByOther}</span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">代金券金额：</td><td>
											<span id="DvoucherMoney">
											<c:if test="${orderInfo.voucherMoney}">${orderInfo.voucherMoney}</c:if>
											<c:if test="${!orderInfo.voucherMoney}">无</c:if>
											</span></td>
											<td width="20%" class="taright">创建时间：</td>
											<td width="30%"><span id="DoccurTime"><fmt:formatDate value="${orderInfo.occurTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">支付时间：</td>
											<td width="30%"><span id="DpayTime"><fmt:formatDate value="${orderInfo.payTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span></td>
											<td width="20%" class="taright">套餐到期时间 ：</td>
											<td width="30%"><span id="DoverTime"><fmt:formatDate value="${orderInfo.overTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">支付方式：</td>
											<td width="30%"><span id="DpayWayId">${orderInfo.payWayName}</span></td>
											<td width="20%" class="taright">产品到期时间 ：</td>
											<td width="30%"><span id="DoverTime"><fmt:formatDate value="${orderInfo.proOverTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">产品数量：</td>
											<td><span id="Dcount">${orderInfo.count}</span></td>
											<td width="20%" class="taright">购买类型：</td>
											<td width="30%">
											<span id="DbuyType">
											<c:if test="${orderInfo.buyType == 0}">新购</c:if>
										    <c:if test="${orderInfo.buyType == 1}">续费</c:if>
										    <c:if test="${orderInfo.buyType == 1}">升级</c:if>
											</span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">订单状态：</td>
											<td width="30%">
											<span id="DorderState">
											<c:if test="${orderInfo.orderState == 0}">已付款</c:if>
										    <c:if test="${orderInfo.orderState == 1}">待付款</c:if>
										    <c:if test="${orderInfo.orderState == 2}">已取消</c:if>
											</span></td>
											<td width="20%" class="taright">是否已经免费试用：</td>
											<td width="30%">
											<span id="DisFree">
											<c:if test="${orderInfo.isFree == 0}">未免费试用</c:if>
										    <c:if test="${orderInfo.isFree == 1}">已免费试用</c:if>
											</span></td>
										</tr>
										<tr>
											<td width="20%" class="taright">删除状态：</td>
											<td width="30%"><span id="DisDelete">
											<c:if test="${orderInfo.isDelete == 0}">已删除</c:if>
										    <c:if test="${orderInfo.isDelete == 1}">已彻底删除</c:if>
										    <c:if test="${orderInfo.isDelete != 1 && orderInfo.isDelete != 0}">未删除</c:if>
											</span></td>
											<td width="20%" class="taright">是否开通：</td>
											<td width="30%">
											<span id="DisDredge">
											<c:if test="${orderInfo.isDredge == 0}">未开通</c:if>
										    <c:if test="${orderInfo.isDredge == 1}">已开通</c:if>
											</span>
											</td>
										</tr>
									</tbody>
								</table>
								<div id="showPics" class=""> 
									<c:forEach items="${aList}" var="al">
										<a href="${al.attachPath}"><img alt="" src="${al.attachPath}"></a>
									</c:forEach>
								</div>
                            </div>
                        </div>

                    </div><!-- /.row -->
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->

        <!-- 公用js文件引入 -->
        <jsp:include page="../admin/commonJs.jsp"></jsp:include>
		
        <script src="/js/admin/orderManager.js"></script>
     
    </body>
</html>
